package com.zhuizikejithreeig.cn.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by 赵航 on 2018/2/27.
 */

public class NotPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mFragments;
    private String[]       mTitles;


    public NotPagerAdapter(FragmentManager fm, List<Fragment> fragments, String[] title) {
        super(fm);
        this.mFragments = fragments;
        this.mTitles = title;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }
}
